package com.geekweb.test;

import java.rmi.RemoteException;
import java.util.List;

import com.geek.log4jcontrol.core.ConfigHis;
import com.geek.log4jcontrol.remote.Log4jControlRemote;
import com.geekweb.common.RmiServiceHolder;

public class Client {
	public static void main(String args[]) throws RemoteException {
		Log4jControlRemote oLog4jControlRemote;
			oLog4jControlRemote = (Log4jControlRemote) RmiServiceHolder.getRemoteService("rmi://127.0.0.1:8888/Log4jControl");
			// String currentConfig =
			// oLog4jControlRemote.getCurrentConfig("DEFAULT");
			// oLog4jControlRemote.initConfig("DEFAULT", currentConfig);
			// ConfigHis oConfigHis = oLog4jControlRemote.getConfig("DEFAULT", "LC20120803165836");
			// System.out.println(oConfigHis);
			List<ConfigHis> oConfigHisList = oLog4jControlRemote.getConfigList("DEFAULT");
			for (ConfigHis oConfigHis : oConfigHisList) {
				System.out.println(oConfigHis);
			}
	}
}
